package chapter06.E7.E19;

import java.util.Iterator;
import java.util.Set;
import java.util.TreeMap;

public class E19 {
    public static void main(String[] args) {
        TreeMap map = new TreeMap();
        map.put(3,"李何威");
        map.put(1,"王梦博");
        map.put(4,"谢恩照");
        map.put(3,"李何威");
        Set ks = map.keySet();
        Iterator it = ks.iterator();
        while(it.hasNext()) {
            Object key = it.next();
            System.out.println(key+" : "+map.get(key));
        }
        System.out.println(map);
    }
}
